<script setup>
import { ref } from "vue";
import { useRouter, useRoute } from "vue-router";
import { timeFormat } from "../../utils/practiceUtil";
const route = useRoute();
const router = useRouter();
const data = ref(route.query);
const onClickLeft = () => {
  router.back();
};
</script>

<template>
  <van-sticky>
    <van-nav-bar
      title="详情"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
  </van-sticky>
  <van-cell-group>
    <van-cell title="【公司名称】" :value="data.company" />
    <van-cell
      title="【公司简介】"
      v-show="!!data.companyInfo"
      :label="data.companyInfo"
    />
    <van-cell title="【实习部门】" v-show="!!data.department" :value="data.department" />
    <van-cell title="【岗位】" :value="data.station" />
    <van-cell
      title="【薪资待遇】"
      :value="
        data.salary ? (data.salary.trim() ? data.salary : '面议') : '面议'
      "
    />
    <van-cell title="【工作地址】" :value="data.address" />
    <van-cell title="【工作内容】" :label="data.work" />
    <van-cell title="【实习要求】" :label="data.requirement" />
    <van-cell title="【实习收获】" v-show="!!data.obtained" :label="data.obtained" />
    <van-cell title="【邮箱】" :value="data.email" />
    <van-cell title="【邮件主题及附件】" :label="data.emailFormat" />
    <van-cell title="【简历投递截止时间】" :value="data.expire?timeFormat(data.expire):'未填写'" />
  </van-cell-group>
</template>
<style scoped>
.van-cell__label{
    white-space: pre-wrap !important;
}
</style>
